home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10220 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: A question on for loop
  5. Date: Fri, 15 Mar 96 23:56:50 GMT
  6. Organization: none
  7. Message-ID: <826934210snz@genesis.demon.co.uk>
  8. References: <4i77ca$161@ccshst05.cs.uoguelph.ca> <1996Mar14.041132.26035@zcon.com>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!genesis.demon.co.uk
  13.  
  14. In article <1996Mar14.041132.26035@zcon.com>
  15.            szh@zcon.com "Syed Zaeem Hosain" writes:
  16.  
  17. >        i = 0;
  18. >        while ( i < 20 )
  19. >        {
  20. >                [some code here]
  21. >                ...
  22. >
  23. >                ++i;    /* Can be i++ without any difference */
  24. >        }
  25. >
  26. >The ++i can be i++ without any difference *in this case shown* since
  27. >you are not relying on the side effect of the assignment.
  28.  
  29. Or rather you are relying on the side effect only and not the value of the
  30. expression.
  31.  
  32. -- 
  33. -----------------------------------------
  34. Lawrence Kirby | fred@genesis.demon.co.uk
  35. Wilts, England | 70734.126@compuserve.com
  36. -----------------------------------------
  37.